<!--
 * @Author: your name
 * @Date: 2021-02-19 13:25:20
 * @LastEditTime: 2021-02-19 13:38:23
 * @LastEditors: Please set LastEditors
 * @Description: 删除按钮
 * @FilePath: \jianfa-admin\src\components\DelButton.vue
-->
<template>
  <el-popconfirm
    class="el-del"
    confirm-button-text="确定"
    cancel-button-text="取消"
    icon="el-icon-delete"
    icon-color="red"
    title="您确定删除吗？"
    @confirm="$emit('click')"
  >
    <el-button style="color: red" icon="el-icon-delete" :size="size" :type="type" slot="reference"><slot></slot></el-button>
  </el-popconfirm>
</template>
<script>
export default {
 props:{
  size:{
   type:String,
   default:'mini'
  },
  type:{
   type:String,
   default:'text'
  }
 }
};
</script>
<style lang='scss' scoped>
.el-del{
  margin-left:10px;
}
</style>